package com.his.system.manager;

import java.io.OutputStream;
import java.net.InetSocketAddress;
import java.net.Socket;

/**
 * DoServer
 *
 * @Description
 * @Author HHJ
 * @Date 2020-08-04 14:08
 */
public class DoClient {

    public static void main(String[] args) {
        //client程序
       doClient();

    }

    private static void doClient() {
        try {
            Socket s = new Socket();

            s.connect(new InetSocketAddress("127.0.0.1", 3113));

            OutputStream os = s.getOutputStream();
            os.write("Hello Client".getBytes());

            s.close();

            System.in.read();//防止程序退出
        } catch (Exception e) {
            e.printStackTrace();
        }
    }
}
